package net.lulihu.pangolin.headless.server.config;

import lombok.Getter;
import lombok.NoArgsConstructor;
import net.lulihu.pangolin.headless.common.container.annotation.Component;
import net.lulihu.pangolin.headless.common.container.templet.Initialization;
import net.lulihu.pangolin.headless.common.properties.ConfigProperties;

@Getter
@NoArgsConstructor
@Component
public class ProxyServerConfig implements Initialization {

    /**
     * 启动端口
     */
    private Integer port;

    /**
     * 服务器认证秘钥
     */
    private String secret;


    @Override
    public void after() {
        ConfigProperties config = ConfigProperties.getDefault();

        port = config.getIntValue("port");
        secret = config.getStringValue("secret");
    }
}
